Issue 52913: Fix determination of existing index names when dropping#6967
Merged
Conversation
… construction, which provides a bit more flexibility (e.g., allows construction of audit providers used in lookups)
Contributor
labkey-susanh
left a comment
There was a problem hiding this comment.
The PR rationale says we stop guessing index names but there is still a TODO related to that. Still something you plan to do in this PR?
Contributor
Author
I'm keen to get rid of this one last code path that guesses index names (on PostgreSQL... I'm not going to fight SQL Server at this point), but this PR has already taken longer than I wanted and I'd like it to bake a while before making more changes. And I'm anxious to get those SQL scripts and schema version bump merged. I've opened Issue 53838 to address this as a follow-on (and updated the comment in the method). |
labkey-susanh
approved these changes
Sep 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Reconcile and consolidate multiple index handling code paths into a single method that creates/drops indices on provisioned domains. And, especially, stop trying to guess an index's name when dropping it.
In the related PR,
AbstractAuditTypeProvider.updateIndices()(which was already inspecting index meta data to determine indices to add/drop based on their characteristics) was taught to pass existing index names on toStorageProvisionerfor dropping. This PR pushes the audit implementation into StorageProvisioner and switches callers of the redundant methods to use it.The PR includes a bonus side quest that fixes domain URIs and domain URI resolution in a bunch of audit domains to ensure that we can use
domain.getDomainKind()with confidence.Related Pull Requests
Tasks 📍
StorageProvisioner.ensureTableIndices()method